//
//  InfoCell.swift
//  LoadBSBJ
//
//  Created by eport_user1 on 2018/1/8.
//  Copyright © 2018年 eport_user1. All rights reserved.
//

import UIKit
import SDWebImage

class InfoCell: UITableViewCell {

    @IBOutlet weak var headerImage: UIImageView!
    
    @IBOutlet weak var contentLabel: UILabel!
    
    @IBOutlet weak var headerLabel: UILabel!
    
    var model:ContentModel?
        
   
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        headerImage.layer.cornerRadius = 20
        headerImage.layer.masksToBounds = true
        headerImage.layer.borderWidth = 2
        headerImage.layer.borderColor = UIColor.red.cgColor
        
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        //profile_image
        
        headerLabel.text = model?.name
        let string1 = model?.profile_image
        let url = URL.init(string: string1!)
        headerImage.sd_setImage(with: url, completed: nil)
        contentLabel.text = model?.text
        
    }
    
    
}
